home *** CD-ROM | disk | FTP | other *** search
/ Turnbull China Bikeride / Turnbull China Bikeride - Disc 2.iso / STUTTGART / LANG / BASIC / LIB / EVENTSHELL / DOCS / Windows < prev   
Text File  |  1996-05-05  |  15KB  |  625 lines

  1. FNshell_WindowSetSpriteArea()
  2. =>    int    window handle
  3.     int    address of sprite area
  4.  
  5. <=    int    window handle
  6.  
  7. --------------------------------------------------------
  8.  
  9. PROCshell_OpenWindow()
  10. =>    int    window handle
  11.     int    full flag
  12.     int    front flag
  13.  
  14. Any panes attached to the window with
  15. PROCshell_AttachPane will be opened
  16. automatically.
  17.  
  18. --------------------------------------------------------
  19.  
  20. PROCshell_CloseWindow()
  21. =>    int    window handle
  22.  
  23. Any panes attached to the window with
  24. PROCshell_AttachPane will be closed
  25. automatically.
  26.  
  27. --------------------------------------------------------
  28.  
  29. FNshell_MessageWindow()
  30. =>    str    message text
  31.     int    cancel flag
  32.     str    program name
  33.     str    header
  34.  
  35. <=    int    result
  36.  
  37. This routine is useful for OK to quit type
  38. windows. The returned result is 1 if OK
  39. was clicked, 2 if Cancel was selected.
  40.  
  41. Cancel Flag
  42. FALSE = don't display a CANCEL icon
  43. TRUE  = message window has a CANCEL icon
  44.  
  45. Program Name
  46. Displayed in the title bar of the
  47. message window. If "" then FNshell_GetAppName
  48. is called to find the name of the running
  49. application
  50.  
  51. Header
  52. When null then the title bar will read
  53. "Message from AppName". When non-null
  54. the header is displayed instead
  55.  
  56. --------------------------------------------------------
  57.  
  58. PROCshell_WindowMoveTo()
  59. =>    int    window handle to move
  60.     int    x coord to move to
  61.     int    y coord to move to
  62.  
  63. See also PROCshell_WindowMoveToIcon.
  64.  
  65. --------------------------------------------------------
  66.  
  67. PROCshell_WindowMoveToIcon()
  68. =>    int    window handle to move
  69.     int    window handle containing icon
  70.     int    icon handle
  71.     int    x offset of moved window from icon
  72.     int    y offset of moved window from icon
  73.  
  74. A problem can occur with this call if RISC OS
  75. 2 is in use. As it does not seem possible to
  76. discover the scroll offsets of the iconbar the
  77. window may nove to the wrong position. Any
  78. suggestions would be gratefully received...
  79.  
  80. See also PROCshell_WindowMoveTo.
  81.  
  82. --------------------------------------------------------
  83.  
  84. PROCshell_WindowCentreOnScreen()
  85. =>    int    window handle to move
  86.  
  87. Centres a window on the screen, checking
  88. the actual size of the screen first.
  89.  
  90. --------------------------------------------------------
  91.  
  92. PROCshell_WindowCentreOnPointer()
  93. =>    int    window handle to move
  94.  
  95. This routine attempts to centre the
  96. window on the current pointer position.
  97. It may fail to do so if the pointer is
  98. too close to the edge of the desktop
  99. and windows are not allowed to move
  100. outside the desktop.
  101.  
  102. This routine is useful in the 'PreOpen'
  103. function of a static dialog box. Dynamic
  104. dialog boxes are automatically centred
  105. on the pointer.
  106.  
  107. See also PROCshell_WindowMoveTo.
  108.  
  109. --------------------------------------------------------
  110.  
  111. PROCshell_CreateWindow()
  112. =>    str    window identifier
  113.     int    window handle (ignored on entry)
  114.  
  115. <=    int    window handle of newly created window
  116.  
  117. --------------------------------------------------------
  118.  
  119. PROCshell_OpenWindowStatic()
  120. =>    int    window handle
  121.  
  122. The window will be brought to the top
  123. of the stack by this call. The window
  124. must have been created with a call to
  125. PROCshell_CreateWindowStatic - an error
  126. will be generated if this is not the
  127. case.
  128.  
  129. Any panes attached to the window with
  130. PROCshell_AttachPane will be opened
  131. automatically.
  132.  
  133. --------------------------------------------------------
  134.  
  135. PROCshell_CreateWindowStatic()
  136. =>    str    window identifier
  137.     int    window handle (ignored on entry)
  138.  
  139. <=    int    window handle of newly created window
  140.  
  141. --------------------------------------------------------
  142.  
  143. PROCshell_WindowRetitle()
  144. =>    int    window handle (may be altered,
  145.          new value returned)
  146.     str    new title
  147.  
  148. The window handle may be changed by this
  149. routine, be sure to use the value returned
  150. when referring to the window in the future.
  151.  
  152. It is not necessary to make the window title
  153. indirected.
  154.  
  155. --------------------------------------------------------
  156.  
  157. PROCshell_WindowSetTitleRightJust()
  158. =>    int    window handle (may be altered,
  159.          new value returned)
  160.  
  161. --------------------------------------------------------
  162.  
  163. PROCshell_WindowSetTitleCentreJust
  164. =>    int    window handle (may be altered,
  165.          new value returned)
  166.  
  167. --------------------------------------------------------
  168.  
  169. PROCshell_WindowResize()
  170. =>
  171.     int    window handle
  172.     int    min x coord of workarea
  173.     int    min y coord of workarea
  174.     int    max x coord of workarea
  175.     int    max y coord of workarea
  176.     bool    open flag
  177.  
  178. --------------------------------------------------------
  179.  
  180. PROCshell_WindowBringToTop()
  181. =>    int    window handle to bring to top
  182.  
  183. This routine causes a wimp message to be sent to
  184. bring a window to the top. 
  185.  
  186. It may take several wimp poll events before the
  187. window is opened, however, so you cannot assume
  188. it is actually open immediately after this call.
  189.  
  190. You can use FNshell_WindowIsOnTop to check the
  191. status of the window after this call.
  192.  
  193. --------------------------------------------------------
  194.  
  195. FNshell_WindowIsOnTop()
  196. =>    int    window handle
  197.  
  198. <=    bool    TRUE if window is on top, otherwise
  199.          FALSE
  200.  
  201. This function can be used to discover if the given
  202. window is on top of the stack (i.e. completely
  203. uncovered). It is especially useful after a call
  204. to PROCshell_WindowBringToTop as it may take
  205. several calls to Wimp_Poll before the window is
  206. brought to the top. The window may belong to another
  207. task.
  208.  
  209. --------------------------------------------------------
  210.  
  211. FNshell_WindowHasTitleBar()
  212. =>    int    window handle
  213.  
  214. <=    bool    TRUE if window has a title bar, otherwise
  215.          FALSE
  216.  
  217. --------------------------------------------------------
  218.  
  219. FNshell_WindowGetTitle()
  220. =>    int    window handle
  221.  
  222. <=    str    window title (null if no title)
  223.  
  224. --------------------------------------------------------
  225.  
  226. FNshell_WindowTitleBufferLength()
  227. =>    int    window handle
  228.  
  229. <=    int    buffer length (12 if title is not
  230.          indirected)
  231.  
  232. --------------------------------------------------------
  233.  
  234. FNshell_WindowIsMoveable()
  235. =>    int    window handle
  236.  
  237. <=    bool    TRUE if window is moveable, otherwise
  238.          FALSE
  239.  
  240. --------------------------------------------------------
  241.  
  242. FNshell_WindowIsAPane()
  243. =>    int    window handle
  244.  
  245. <=    bool    TRUE if window is a pane, otherwise
  246.          FALSE
  247.  
  248. --------------------------------------------------------
  249.  
  250. FNshell_WindowIsNotBounded()
  251. =>    int    window handle
  252.  
  253. <=    bool    TRUE if window may move outside
  254.          the screen area, otherwise FALSE
  255.  
  256. --------------------------------------------------------
  257.  
  258. FNshell_WindowTrapsHotKeys()
  259. =>    int    window handle
  260.  
  261. <=    bool    TRUE if window traps hot keys,
  262.          otherwise FALSE
  263.  
  264. --------------------------------------------------------
  265.  
  266. FNshell_WindowHasBeenToggled()
  267. =>    int    window handle
  268.  
  269. <=    bool    TRUE if window has been toggled to
  270.          full size, otherwise FALSE
  271.  
  272. --------------------------------------------------------
  273.  
  274. FNshell_WindowHasInputFocus()
  275. =>    int    window handle
  276.  
  277. <=    bool    TRUE if window has the input focus,
  278.          otherwise FALSE
  279.  
  280. --------------------------------------------------------
  281.  
  282. FNshell_WindowHasBackIcon()
  283. =>    int    window handle
  284.  
  285. <=    bool    TRUE if window has a send to back icon,
  286.          otherwise FALSE
  287.  
  288. --------------------------------------------------------
  289.  
  290. FNshell_WindowHasCloseIcon()
  291. =>    int    window handle
  292.  
  293. <=    bool    TRUE if window has a close icon,
  294.          otherwise FALSE
  295.  
  296. --------------------------------------------------------
  297.  
  298. FNshell_WindowHasToggleIcon()
  299. =>    int    window handle
  300.  
  301. <=    bool    TRUE if window has a toggle icon,
  302.          otherwise FALSE
  303.  
  304. --------------------------------------------------------
  305.  
  306. FNshell_WindowHasVScrollBar()
  307. =>    int    window handle
  308.  
  309. <=    bool    TRUE if window has a vertical scroll bar,
  310.          otherwise FALSE
  311.  
  312. --------------------------------------------------------
  313.  
  314. FNshell_WindowHasHScrollBar()
  315. =>    int    window handle
  316.  
  317. <=    bool    TRUE if window has a horizontal scroll bar,
  318.          otherwise FALSE
  319.  
  320. --------------------------------------------------------
  321.  
  322. FNshell_WindowHasAdjustSizeIcon()
  323. =>    int    window handle
  324.  
  325. <=    bool    TRUE if window has an adjust size icon,
  326.          otherwise FALSE
  327.  
  328. --------------------------------------------------------
  329.  
  330. FNshell_WindowIsOpen()
  331. =>    int    window handle
  332.  
  333. <=    bool    TRUE if window is open, otherwise
  334.          FALSE
  335.  
  336. --------------------------------------------------------
  337.  
  338. PROCshell_WindowToggleBackIcon()
  339. =>    int    window handle
  340.  
  341. <=    int    updated window handle
  342.  
  343. Adds a 'Back icon' to a window if it doesn't
  344. have one, removes it if it does. Also redisplays
  345. window in its new state if it is open.
  346.  
  347. --------------------------------------------------------
  348.  
  349. PROCshell_WindowToggleCloseIcon()
  350. =>    int    window handle
  351.  
  352. <=    int    updated window handle
  353.  
  354. Adds a 'Close icon' to a window if it doesn't
  355. have one, removes it if it does. Also redisplays
  356. window in its new state if it is open.
  357.  
  358. --------------------------------------------------------
  359.  
  360. PROCshell_WindowToggleTitleBar()
  361. =>    int    window handle
  362.  
  363. <=    int    updated window handle
  364.  
  365. Adds a Title bar to a window if it doesn't one,
  366. removes it if it does. Also redisplays window
  367. in its new state if it is open.
  368.  
  369. --------------------------------------------------------
  370.  
  371. PROCshell_WindowToggleToggleIcon()
  372. =>    int    window handle
  373.  
  374. <=    int    updated window handle
  375.  
  376. Adds a 'Toggle size icon'  to a window if it
  377. doesn't one, removes it if it does. Also
  378. redisplays window in its new state if it is
  379. open.
  380.  
  381. --------------------------------------------------------
  382.  
  383. PROCshell_WindowToggleVScrollBar()
  384. =>    int    window handle
  385.  
  386. <=    int    updated window handle
  387.  
  388. Adds a vertical scroll bar to a window if
  389. it doesn't one, removes it if it does. Also
  390. redisplays window in its new state if it is
  391. open.
  392.  
  393. --------------------------------------------------------
  394.  
  395. PROCshell_WindowToggleAdjustSizeicon()
  396. =>    int    window handle
  397.  
  398. <=    int    updated window handle
  399.  
  400. Adds a 'Adjust size icon' to a window if it
  401. doesn't one, removes it if it does. Also
  402. redisplays window in its new state if it is
  403. open.
  404.  
  405. --------------------------------------------------------
  406.  
  407. PROCshell_WindowToggleHScrollBar()
  408. =>    int    window handle
  409.  
  410. <=    int    updated window handle
  411.  
  412. Adds a horizontal scroll bar to a window if
  413. it doesn't one, removes it if it does. Also
  414. redisplays window in its new state if it is
  415. open.
  416.  
  417. --------------------------------------------------------
  418.  
  419. FNshell_WindowLoaded()
  420. =>    str    window name (max 11 characters)
  421.  
  422. <=    bool    TRUE if template is loaded, otherwise
  423.          FALSE
  424.  
  425. --------------------------------------------------------
  426.  
  427. FNshell_WindowCountIcons()
  428. =>    int    window handle
  429.  
  430. <=    int    number of icons present in the
  431.          window (including those created
  432.          after the window)
  433.  
  434. This function can be used to discover the buffer
  435. size required for a call to Wimp_GetWindowInfo.
  436.  
  437. --------------------------------------------------------
  438.  
  439. PROCshell_OpenWindowDynamic()
  440. =>    str    window identifier name
  441.     str    pre-open  function
  442.          (optional, may be "")
  443.     str    post-open function
  444.          (optional, may be "")
  445.  
  446. Clicking outside the window or pressing
  447. <ESC> will close the window (the
  448. window is opened as a menu in fact).
  449.  
  450. Any panes attached to the window with
  451. PROCshell_AttachPane will be opened
  452. automatically.
  453.  
  454. Note that menus cannot be attached to
  455. dynamic windows as the mouse click
  456. would close it! 
  457.  
  458. User PreOpen FN (PROCshell_OpenWindowDynamic)
  459. =>    int    window handle
  460.  
  461. <=    int    ignore
  462.  
  463. User PostOpen FN (PROCshell_OpenWindowDynamic)
  464. =>    int    window handle
  465.  
  466. <=    int    ignore
  467.          
  468. --------------------------------------------------------
  469.  
  470. PROCshell_WindowSetForegroundColour()
  471. =>    int    window handle
  472.     int    wimp colour number
  473.  
  474. This routine may update the window handle
  475.  
  476. --------------------------------------------------------
  477.  
  478. PROCshell_WindowSetBackgroundColour()
  479. =>    int    window handle
  480.     int    wimp colour number
  481.  
  482. This routine may update the window handle
  483.  
  484. --------------------------------------------------------
  485.  
  486. PROCshell_WindowScrollTo()
  487. =>    int    window handle
  488.     int    x scroll offset
  489.     int    y scroll offset
  490.  
  491. Sets the scroll offsets for the specified
  492. window to the new scroll offsets. If the window
  493. is closed it is not opened by this call.
  494.  
  495. --------------------------------------------------------
  496.  
  497. PROCshell_WindowScrollBy()
  498. =>    int    window handle
  499.     int    x scroll offset to add
  500.     int    y scroll offset to add
  501.  
  502. Adds the specified scroll offsets to the current ones,
  503. effectively forcing the window to scroll by the given
  504. amounts. Useful for auto scrolling a window while dragging
  505. a selection.
  506.  
  507. If the window is closed it is not opened by this call.
  508.  
  509. --------------------------------------------------------
  510.  
  511. PROCshell_WindowSendToBack()
  512. =>    int    window handle to send to back
  513.  
  514. This routine causes a wimp message to be sent to
  515. send a window behind all the others on the screen.
  516.  
  517. It may take several wimp poll events before the
  518. window is opened, however, so you cannot assume
  519. it is actually open immediately after this call.
  520.  
  521. --------------------------------------------------------
  522.  
  523. FNshell_WindowGetTopPaneDepth()
  524. =>    int    window handle
  525.  
  526. <=    int    depth of pane in OS units (0 if no pane
  527.          attached)
  528.  
  529. --------------------------------------------------------
  530.  
  531. FNshell_WindowGetBottomPaneDepth()
  532. =>    int    window handle
  533.  
  534. <=    int    depth of pane in OS units (0 if no pane
  535.          attached)
  536.  
  537. --------------------------------------------------------
  538.  
  539. PROCshell_WindowGetPosition()
  540. =>    int    window handle
  541.     int    min x coord (OS units) updated on return
  542.     int    min y coord (OS units) updated on return
  543.     int    max x coord (OS units) updated on return
  544.     int    max y coord (OS units) updated on return
  545.  
  546. Returns the position of the window relative to the bottom
  547. left of the screen
  548.  
  549. --------------------------------------------------------
  550.  
  551. PROCshell_WindowGetCentre()
  552. =>    int    window handle
  553.     int    x coord (OS units) updated on return
  554.     int    y coord (OS units) updated on return
  555.  
  556. Returns the centre of the window's visible area relative
  557. to the bottom left of the screen
  558.  
  559. --------------------------------------------------------
  560.  
  561. FNshell_DeleteWindow()
  562. =>    int    window handle
  563.  
  564. Destroys the specified window, removing it from the
  565. screen and updating internal references stored by
  566. EvntShell
  567.  
  568. --------------------------------------------------------
  569.  
  570. PROCshell_WindowUserRedrawGetLines()
  571. =>    int    address of window redraw block returned
  572.          by wimp
  573.     int    line spacing    (OS units)
  574.     int    top margin    (OS units)
  575.     int    first    line to redraw (updated on return)
  576.     int    last    line to redraw (updated on return)
  577.  
  578. This call can be used in a UserRedraw FN to calculate
  579. which text lines need to be redrawn when a redraw request
  580. is received. Note that it is assumed that the lines of
  581. text are equally spaced.
  582.  
  583. The first line is numbered 0.
  584.  
  585. Using this call can substantially reduce the amount of
  586. time your application spends redrawing a window.
  587.  
  588. Example code:
  589.  
  590. DEF FN_UserRedraw_Mainw( blk%, x0%, y0% )
  591. LOCAL top_line%, bottom_line%, top_margin%, line_spacing%
  592. LOCAL line_ctr%, max_nr_lines%
  593. top_margin%   = 4
  594. line_spacing% = 32
  595. max_nr_lines% = 100
  596. PROCshell_WindowUserRedrawGetLines( blk%, line_spacing, top_margin%, top_line%, bottom_line% )
  597. line_ctr% = 0
  598. REPEAT
  599.   IF line_ctr% >= top_line% AND line_ctr% <= bottom_line% THEN
  600.     REM perform text plotting here...
  601.   ENDIF
  602.   line_ctr% += 1
  603. UNTIL line_ctr% = max_nr_lines% - 1
  604. = 0
  605.  
  606. --------------------------------------------------------
  607.  
  608. PROCshell_WindowSetDefaultPosition()
  609. =>    str    window template name
  610.     int    xmin (OS coordinates)
  611.     int    ymin (OS coordinates)
  612.     int    xmax (OS coordinates)
  613.     int    ymax (OS coordinates)
  614.  
  615. This call sets the position of a window on the screen
  616. before it is opened. This is handy for programs that
  617. store the last window position in an options file.
  618.  
  619. This call should be made before the window is
  620. created from the template.
  621.  
  622. An error occurs if the window template name is not
  623. in the template file.
  624.  
  625. --------------------------------------------------------